# Contributor:
# Maintainer:
pkgname=py3-cparser
_pkgname=pycparser
pkgver=2.20
pkgrel=0
pkgdesc="C parser written in Python3"
url="https://github.com/eliben/pycparser"
arch="noarch"
license="BSD-3-Clause"
depends="python3"
makedepends="py3-setuptools"
source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"

replaces="py-cparser" # Backwards compatibility
provides="py-cparser=$pkgver-r$pkgrel" # Backwards compatibility

build() {
	python3 setup.py build
}

check() {
	python3 tests/all_tests.py
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
}

sha512sums="ff0853c9f981b43b4f2e879350715c07b02cf9dab223d4980d8fe0a3138c98041b5f848a9355ae4f1cb45e7f137c03a88843008e18d77af9250e0d9c55f5ca1b  pycparser-2.20.tar.gz"
